TreeView for WinForms | ComponentOne
C1.Util Namespace / RawFontSubSet Class / MeasureText Method / MeasureText(String,Boolean,Int32,Int32,Int32[],Int32) Method
The text string.
Whether using a vertical font.
Output calculated width of the text.
Output calculated height of the text.
Output calculated widths for each character.
The default width of some character.

In This Topic
    MeasureText(String,Boolean,Int32,Int32,Int32[],Int32) Method
    In This Topic
    Measure text for this font subset.
    Syntax
    'Declaration
     
    
    Public Overloads Function MeasureText( _
       ByVal text As String, _
       ByVal vertical As Boolean, _
       ByRef width As Integer, _
       ByRef height As Integer, _
       ByRef charWidths() As Integer, _
       Optional ByVal defaultWidth As Integer _
    ) As Integer
    public int MeasureText( 
       string text,
       bool vertical,
       out int width,
       out int height,
       out int[] charWidths,
       int defaultWidth
    )

    Parameters

    text
    The text string.
    vertical
    Whether using a vertical font.
    width
    Output calculated width of the text.
    height
    Output calculated height of the text.
    charWidths
    Output calculated widths for each character.
    defaultWidth
    The default width of some character.

    Return Value

    If calculated then return true, otherwise false.
    See Also